# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=py3-django-rest-swagger
_pkgname=django-rest-swagger
pkgver=2.2.0
pkgrel=3
pkgdesc="Swagger Documentation Generator for Django REST Framework"
url="https://github.com/marcgibbons/django-rest-swagger"
arch="noarch"
license="BSD-2-Clause"
depends="py3-django py3-django-rest-framework py3-core-api py3-openapi-codec
	py3-simplejson"
makedepends="py3-setuptools"
checkdepends="py3-tz py3-jinja2 py3-uritemplate"
source="$pkgname-$pkgver.tar.gz::https://github.com/marcgibbons/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-django-rest-swagger" # Backwards compatibility
provides="py-django-rest-swagger=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py --quiet build
}

package() {
	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

check() {
	python3 runtests.py
}

sha512sums="1838f5cc3206a9c69e787497da780ec75e422348b8e6c146d478d25c13a066c623e732dd3ff7ad0f33ed47742d12f3636f4cefafa54ecb6eeb81cfc3e11f2d23  py3-django-rest-swagger-2.2.0.tar.gz"
